// 切换语音播报
function toggleAudio() {
    // 实现语音播报功能
    alert('开始语音播报');
}

// 显示更多选项
function showMoreOptions() {
    const options = [
        { text: '分享', icon: 'share' },
        { text: '举报', icon: 'report' },
        { text: '不感兴趣', icon: 'dislike' }
    ];
    
    const modal = document.createElement('div');
    modal.className = 'zheng_options_modal';
    modal.innerHTML = `
        <div class="zheng_options_content">
            ${options.map(option => `
                <div class="zheng_option_item">
                    <i class="iconfont icon-${option.icon}"></i>
                    <span>${option.text}</span>
                </div>
            `).join('')}
            <div class="zheng_option_cancel">取消</div>
        </div>
    `;
    
    document.body.appendChild(modal);
    
    // 点击遮罩层关闭
    modal.addEventListener('click', (e) => {
        if (e.target === modal) {
            document.body.removeChild(modal);
        }
    });
    
    // 点击取消关闭
    modal.querySelector('.zheng_option_cancel').addEventListener('click', () => {
        document.body.removeChild(modal);
    });
}

// 点赞功能
function toggleLike(btn) {
    const likeCount = btn.querySelector('span');
    const count = parseInt(likeCount.textContent);
    const isLiked = btn.classList.contains('active');
    
    if (isLiked) {
        likeCount.textContent = count - 1;
        btn.classList.remove('active');
    } else {
        likeCount.textContent = count + 1;
        btn.classList.add('active');
    }
}

// 收藏功能
function toggleStar(btn) {
    const starCount = btn.querySelector('span');
    const count = parseInt(starCount.textContent);
    const isStarred = btn.classList.contains('active');
    
    if (isStarred) {
        starCount.textContent = count - 1;
        btn.classList.remove('active');
    } else {
        starCount.textContent = count + 1;
        btn.classList.add('active');
    }
}

function goToHome() {
    window.location.href = 'index.html';
} 